1. Field of the Invention
The present invention relates to a distance measuring apparatus and a distance measuring method for use with an imaging apparatus, such as a digital still camera and the like, having a distance measuring function.
2. Description of the Related Art
In imaging devices, such as digital still cameras (digital cameras), digital video cameras, and the like, autofocus (AF) mechanisms for bringing the taking lens into focus on a predetermined subject have been widely use. For performing AF operations, the following methods are known. Namely, a method in which the distance to the subject is measured by a distance measuring sensor install in a digital camera, and an AF operation is performed based on the measurement result. In another method, a face of a person or the like is detected from the image data obtained by an imaging means, such as a CCD or the like, then the distance to the subject is calculated according to the size of the face, and an AF operation is performed using the calculation result.
Further, Japanese Unexamined Patent Publication No. 2001-304855 describes a distance measuring apparatus in which a focusing operation is performed accurately and rapidly by detecting the subject within the imaging screen, and measuring the distance to a specific region determined based on the detection result. Still further, Japanese Unexamined Patent Publication No. 2001-166198 describes another distance measuring apparatus in which a face contour is extracted from the obtained image data, and the distance to the region where the contour was detected is selectively measured to more accurately measure the subject distance.
In cases where the distance is measured solely by the distance measuring sensor as in the methods described in Japanese Unexamined Patent Publication Nos. 2001-304855 and 2001-166198, however, the result obtained by the sensor is sometimes different from the actual distance to the subject.
In the method in which the subject distance is calculated according to the size of a face, the calculation result differs from the actual subject distance if the face is small, and accurate subject distance has not been obtained. In this way, if the distance measurement result by the distance measuring sensor or the calculation result according to the size of a face differs from the actual subject distance, the focusing would not be performed accurately, which has led to the reliability degradation of the AF mechanism.